import request from '@/utils/request'

// 查询实时库存列表
export function listStocks(query) {
  return request({
    url: '/system/stocks/list',
    method: 'get',
    params: query
  })
}

// 查询实时库存详细
export function getStocks(stockid) {
  return request({
    url: '/system/stocks/' + stockid,
    method: 'get'
  })
}

// 新增实时库存
export function addStocks(data) {
  return request({
    url: '/system/stocks',
    method: 'post',
    data: data
  })
}

// 修改实时库存
export function updateStocks(data) {
  return request({
    url: '/system/stocks',
    method: 'put',
    data: data
  })
}

// 删除实时库存
export function delStocks(stockid) {
  return request({
    url: '/system/stocks/' + stockid,
    method: 'delete'
  })
}
